<div class="box box-info">
  <div class="box-header with-border">
    <h3 class="box-title">图书编辑</h3>
  </div>
  <!-- /.box-header -->
  <!-- form start -->
  <form #form="ngForm" (ngSubmit)="submit(form)" class="form-horizontal" novalidate>
    <div class="box-body">
      <div class="form-group">
        <label class="col-sm-2 control-label">封面</label>
        <div class="col-sm-10">
          <div class="cover-img" [ngStyle]="{'background-image':'url(file/download?filId='+book.img+')'}"></div>
          <!--<input [(ngModel)]="book.bookname" name="bookname" class="form-control" placeholder="请输入书名">-->
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 control-label">书名</label>
        <div class="col-sm-10">
          <input [(ngModel)]="book.bookname" name="bookname" required class="form-control" placeholder="请输入书名">
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 control-label">作者</label>
        <div class="col-sm-10">
          <input [(ngModel)]="book.author" name="author" required class="form-control" placeholder="请输入书类名称">
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 control-label">分类 {{book.typeId}}</label>
        <div class="col-sm-10">
          <select [(ngModel)]="book.typeId" name="typeId" class="form-control">
            <option *ngFor="let type of typeList" [ngValue]="type.id+''">
              {{type.typeName}}
            </option>
          </select>
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 control-label">ISBN</label>
        <div class="col-sm-10">
          <input [(ngModel)]="book.isbn" name="isbn" required class="form-control" placeholder="请输入书类名称">
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 control-label">简介</label>
        <div class="col-sm-10">
          <textarea [(ngModel)]="book.remark" name="remark" required class="form-control" placeholder="请输入书类名称" rows="3"></textarea>
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 control-label">上传人</label>
        <div class="col-sm-10">
          <input [(ngModel)]="book.submitUserName" name="submitUserName" class="form-control" placeholder="请输入书类名称">
        </div>
      </div>
      <div class="form-group">
        <label class="col-sm-2 control-label">文件下载</label>
        <div class="col-sm-10">
          <a class="btn btn-info" [href]="'file/download?filId='+book.fileId">下载</a>
        </div>
      </div>
      <div class="form-group">

        <label class="col-sm-2 control-label">状态</label>
        <div class="col-sm-10">
          <div class="checkbox">
            <label>
              <input type="checkbox" [checked]="state" [(ngModel)]="state" [ngModelOptions]="{standalone: true}">
              <span *ngIf="state">通过</span>
              <span *ngIf="!state">不通过</span>
            </label>
          </div>
        </div>

      </div>
    </div>
    <!-- /.box-body -->
    <div class="box-footer">

      <button type="submit" class="btn btn-default">确 定</button>
      <span class="error-msg">{{responseErr}}</span>
    </div>
    <!-- /.box-footer -->
  </form>
</div>
